package com.hpu.parser;


import com.hpu.bean.Info;

import org.json.JSONArray;
import org.json.JSONException;

public class InfoParser{

	public Info parse(String parseString) {
		try {
			JSONArray array=new JSONArray(parseString);
			String major=array.getString(13);
			String institute=array.getString(12);
			String testNumber=array.getString(10);
			String classes=array.getString(15);
			String sex=array.getString(3);
			String name=array.getString(1);
			return new Info(major, institute, testNumber, classes, sex, name);
			
		} catch (JSONException e) {
			e.printStackTrace();
		}
		return null;
		
	}

}
